Optimal. Leaf size=140 \[ \frac {a (4 A+3 C) \tanh ^{-1}(\sin (c+d x))}{8 d}+\frac {b (5 A+4 C) \tan (c+d x)}{5 d}+\frac {a (4 A+3 C) \sec (c+d x) \tan (c+d x)}{8 d}+\frac {a C \sec ^3(c+d x) \tan (c+d x)}{4 d}+\frac {b C \sec ^4(c+d x) \tan (c+d x)}{5 d}+\frac {b (5 A+4 C) \tan ^3(c+d x)}{15 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.12, antiderivative size = 140, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 6, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.194, Rules used = {4162, 4132,
3852, 4131, 3853, 3855} \begin {gather*} \frac {a (4 A+3 C) \tanh ^{-1}(\sin (c+d x))}{8 d}+\frac {a (4 A+3 C) \tan (c+d x) \sec (c+d x)}{8 d}+\frac {a C \tan (c+d x) \sec ^3(c+d x)}{4 d}+\frac {b (5 A+4 C) \tan ^3(c+d x)}{15 d}+\frac {b (5 A+4 C) \tan (c+d x)}{5 d}+\frac {b C \tan (c+d x) \sec ^4(c+d x)}{5 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 3852
Rule 3853
Rule 3855
Rule 4131
Rule 4132
Rule 4162
Rubi steps
\begin {align*} \int \sec ^3(c+d x) (a+b \sec (c+d x)) \left (A+C \sec ^2(c+d x)\right ) \, dx &=\frac {b C \sec ^4(c+d x) \tan (c+d x)}{5 d}+\frac {1}{5} \int \sec ^3(c+d x) \left (5 a A+b (5 A+4 C) \sec (c+d x)+5 a C \sec ^2(c+d x)\right ) \, dx\\ &=\frac {b C \sec ^4(c+d x) \tan (c+d x)}{5 d}+\frac {1}{5} \int \sec ^3(c+d x) \left (5 a A+5 a C \sec ^2(c+d x)\right ) \, dx+\frac {1}{5} (b (5 A+4 C)) \int \sec ^4(c+d x) \, dx\\ &=\frac {a C \sec ^3(c+d x) \tan (c+d x)}{4 d}+\frac {b C \sec ^4(c+d x) \tan (c+d x)}{5 d}+\frac {1}{4} (a (4 A+3 C)) \int \sec ^3(c+d x) \, dx-\frac {(b (5 A+4 C)) \text {Subst}\left (\int \left (1+x^2\right ) \, dx,x,-\tan (c+d x)\right )}{5 d}\\ &=\frac {b (5 A+4 C) \tan (c+d x)}{5 d}+\frac {a (4 A+3 C) \sec (c+d x) \tan (c+d x)}{8 d}+\frac {a C \sec ^3(c+d x) \tan (c+d x)}{4 d}+\frac {b C \sec ^4(c+d x) \tan (c+d x)}{5 d}+\frac {b (5 A+4 C) \tan ^3(c+d x)}{15 d}+\frac {1}{8} (a (4 A+3 C)) \int \sec (c+d x) \, dx\\ &=\frac {a (4 A+3 C) \tanh ^{-1}(\sin (c+d x))}{8 d}+\frac {b (5 A+4 C) \tan (c+d x)}{5 d}+\frac {a (4 A+3 C) \sec (c+d x) \tan (c+d x)}{8 d}+\frac {a C \sec ^3(c+d x) \tan (c+d x)}{4 d}+\frac {b C \sec ^4(c+d x) \tan (c+d x)}{5 d}+\frac {b (5 A+4 C) \tan ^3(c+d x)}{15 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.93, size = 96, normalized size = 0.69 \begin {gather*} \frac {15 a (4 A+3 C) \tanh ^{-1}(\sin (c+d x))+\tan (c+d x) \left (15 a (4 A+3 C) \sec (c+d x)+30 a C \sec ^3(c+d x)+8 b \left (15 (A+C)+5 (A+2 C) \tan ^2(c+d x)+3 C \tan ^4(c+d x)\right )\right )}{120 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.19, size = 141, normalized size = 1.01
method | result | size |
derivativedivides | \(\frac {-A b \left (-\frac {2}{3}-\frac {\left (\sec ^{2}\left (d x +c \right )\right )}{3}\right ) \tan \left (d x +c \right )-C b \left (-\frac {8}{15}-\frac {\left (\sec ^{4}\left (d x +c \right )\right )}{5}-\frac {4 \left (\sec ^{2}\left (d x +c \right )\right )}{15}\right ) \tan \left (d x +c \right )+a A \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )+a C \left (-\left (-\frac {\left (\sec ^{3}\left (d x +c \right )\right )}{4}-\frac {3 \sec \left (d x +c \right )}{8}\right ) \tan \left (d x +c \right )+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )}{d}\) | \(141\) |
default | \(\frac {-A b \left (-\frac {2}{3}-\frac {\left (\sec ^{2}\left (d x +c \right )\right )}{3}\right ) \tan \left (d x +c \right )-C b \left (-\frac {8}{15}-\frac {\left (\sec ^{4}\left (d x +c \right )\right )}{5}-\frac {4 \left (\sec ^{2}\left (d x +c \right )\right )}{15}\right ) \tan \left (d x +c \right )+a A \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )+a C \left (-\left (-\frac {\left (\sec ^{3}\left (d x +c \right )\right )}{4}-\frac {3 \sec \left (d x +c \right )}{8}\right ) \tan \left (d x +c \right )+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )}{d}\) | \(141\) |
norman | \(\frac {\frac {\left (4 a A -8 A b +5 a C -8 C b \right ) \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d}-\frac {\left (4 a A +8 A b +5 a C +8 C b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{4 d}-\frac {\left (12 a A -32 A b +3 a C -16 C b \right ) \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{6 d}+\frac {\left (12 a A +32 A b +3 a C +16 C b \right ) \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{6 d}-\frac {4 b \left (25 A +29 C \right ) \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{15 d}}{\left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{5}}-\frac {a \left (4 A +3 C \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{8 d}+\frac {a \left (4 A +3 C \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{8 d}\) | \(223\) |
risch | \(-\frac {i \left (60 a A \,{\mathrm e}^{9 i \left (d x +c \right )}+45 C a \,{\mathrm e}^{9 i \left (d x +c \right )}+120 A a \,{\mathrm e}^{7 i \left (d x +c \right )}+210 C a \,{\mathrm e}^{7 i \left (d x +c \right )}-240 A b \,{\mathrm e}^{6 i \left (d x +c \right )}-560 A b \,{\mathrm e}^{4 i \left (d x +c \right )}-640 C b \,{\mathrm e}^{4 i \left (d x +c \right )}-120 a A \,{\mathrm e}^{3 i \left (d x +c \right )}-210 C a \,{\mathrm e}^{3 i \left (d x +c \right )}-400 A b \,{\mathrm e}^{2 i \left (d x +c \right )}-320 C b \,{\mathrm e}^{2 i \left (d x +c \right )}-60 A a \,{\mathrm e}^{i \left (d x +c \right )}-45 C a \,{\mathrm e}^{i \left (d x +c \right )}-80 A b -64 C b \right )}{60 d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{5}}-\frac {a \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) A}{2 d}-\frac {3 a \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) C}{8 d}+\frac {a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) A}{2 d}+\frac {3 a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) C}{8 d}\) | \(279\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.29, size = 175, normalized size = 1.25 \begin {gather*} \frac {80 \, {\left (\tan \left (d x + c\right )^{3} + 3 \, \tan \left (d x + c\right )\right )} A b + 16 \, {\left (3 \, \tan \left (d x + c\right )^{5} + 10 \, \tan \left (d x + c\right )^{3} + 15 \, \tan \left (d x + c\right )\right )} C b - 15 \, C a {\left (\frac {2 \, {\left (3 \, \sin \left (d x + c\right )^{3} - 5 \, \sin \left (d x + c\right )\right )}}{\sin \left (d x + c\right )^{4} - 2 \, \sin \left (d x + c\right )^{2} + 1} - 3 \, \log \left (\sin \left (d x + c\right ) + 1\right ) + 3 \, \log \left (\sin \left (d x + c\right ) - 1\right )\right )} - 60 \, A a {\left (\frac {2 \, \sin \left (d x + c\right )}{\sin \left (d x + c\right )^{2} - 1} - \log \left (\sin \left (d x + c\right ) + 1\right ) + \log \left (\sin \left (d x + c\right ) - 1\right )\right )}}{240 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 2.20, size = 147, normalized size = 1.05 \begin {gather*} \frac {15 \, {\left (4 \, A + 3 \, C\right )} a \cos \left (d x + c\right )^{5} \log \left (\sin \left (d x + c\right ) + 1\right ) - 15 \, {\left (4 \, A + 3 \, C\right )} a \cos \left (d x + c\right )^{5} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, {\left (16 \, {\left (5 \, A + 4 \, C\right )} b \cos \left (d x + c\right )^{4} + 15 \, {\left (4 \, A + 3 \, C\right )} a \cos \left (d x + c\right )^{3} + 8 \, {\left (5 \, A + 4 \, C\right )} b \cos \left (d x + c\right )^{2} + 30 \, C a \cos \left (d x + c\right ) + 24 \, C b\right )} \sin \left (d x + c\right )}{240 \, d \cos \left (d x + c\right )^{5}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (A + C \sec ^{2}{\left (c + d x \right )}\right ) \left (a + b \sec {\left (c + d x \right )}\right ) \sec ^{3}{\left (c + d x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 334 vs.
\(2 (128) = 256\).
time = 0.51, size = 334, normalized size = 2.39 \begin {gather*} \frac {15 \, {\left (4 \, A a + 3 \, C a\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - 15 \, {\left (4 \, A a + 3 \, C a\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) + \frac {2 \, {\left (60 \, A a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} + 75 \, C a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} - 120 \, A b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} - 120 \, C b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} - 120 \, A a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 30 \, C a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 320 \, A b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 160 \, C b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 400 \, A b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 464 \, C b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 120 \, A a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 30 \, C a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 320 \, A b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 160 \, C b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 60 \, A a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 75 \, C a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 120 \, A b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 120 \, C b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}^{5}}}{120 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 7.68, size = 232, normalized size = 1.66 \begin {gather*} \frac {a\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )\,\left (4\,A+3\,C\right )}{4\,d}-\frac {\left (2\,A\,b-A\,a-\frac {5\,C\,a}{4}+2\,C\,b\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9+\left (2\,A\,a-\frac {16\,A\,b}{3}+\frac {C\,a}{2}-\frac {8\,C\,b}{3}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7+\left (\frac {20\,A\,b}{3}+\frac {116\,C\,b}{15}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+\left (-2\,A\,a-\frac {16\,A\,b}{3}-\frac {C\,a}{2}-\frac {8\,C\,b}{3}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+\left (A\,a+2\,A\,b+\frac {5\,C\,a}{4}+2\,C\,b\right )\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}-5\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8+10\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6-10\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+5\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-1\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________